package com.crm.domain.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

@Data // Lombok注解，自动生成getter、setter、toString等方法
@ApiModel(value = "User", description = "用户信息")
public class User implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "用户ID", example = "1")
    private Long userId;

    @ApiModelProperty(value = "部门ID", example = "101")
    private Long deptId;

    @ApiModelProperty(value = "用户账号", required = true, example = "admin")
    private String userName;

    @ApiModelProperty(value = "用户昵称", required = true, example = "管理员")
    private String nickName;

    @ApiModelProperty(value = "用户类型（00系统用户）", example = "00")
    private String userType;

    @ApiModelProperty(value = "用户邮箱", example = "admin@example.com")
    private String email;

    @ApiModelProperty(value = "手机号码", example = "13800000000")
    private String phonenumber;

    @ApiModelProperty(value = "用户性别（0男 1女 2未知）", example = "0")
    private Character sex;

    @ApiModelProperty(value = "头像地址", example = "http://example.com/avatar.jpg")
    private String avatar;

    @ApiModelProperty(value = "密码", example = "encrypted_password")
    private String password;

    @ApiModelProperty(value = "帐号状态（0正常 1停用）", example = "0")
    private Integer status;

    @ApiModelProperty(value = "删除标志（0代表存在 2代表删除）", example = "0")
    private Character delFlag;

    @ApiModelProperty(value = "最后登录IP", example = "192.168.1.1")
    private String loginIp;

    @ApiModelProperty(value = "最后登录时间", example = "2023-04-01T12:00:00")
    private LocalDateTime loginDate;

    @ApiModelProperty(value = "创建者", example = "system")
    private String createBy;

    @ApiModelProperty(value = "创建时间", example = "2023-04-01T12:00:00")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "更新者", example = "admin")
    private String updateBy;

    @ApiModelProperty(value = "更新时间", example = "2023-04-01T12:00:00")
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "备注")
    private String remark;

    // 如果需要，可以在这里添加更多的逻辑或方法
}
